﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/News.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="Dto" %>
<%@ Import Namespace="Model" %>
 
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h2 class="newstitle"><%: ViewBag.NTitle == null ? "" : ViewBag.NTitle %></h2>
   <%Response.Write(ViewBag.Content ?? ""); %>  
   <ul>
    <%
        IList<NewsDto> news = (ViewBag.NewsList as IList<NewsDto>);
        if(news !=null)
        {
                      
            foreach (NewsDto s in news)
            {
                %>
              <li> <a href="<%:Url.Action("Index","News" ,new {newsid=s.Id}) %>"><%:s.Title %></a>   </li>
                <%
            }
            
        }
     %>
   </ul>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
<title> <%Response.Write(ViewBag.NTitle ?? ""); %> </title>
</asp:Content>
